var util = require('util');
var Base = function(){
  this.name="Base";
  this.age="15";
  this.sayHello = function(){
    console.log("Hello "+this.name);
  }
}
Base.prototype.sayName = function () {
  console.log("i am "+ this.name);
};
var BaseChild = function(){
  this.name = "BaseChild";
}
util.inherits(BaseChild,Base);

var objbase = new Base();
var objbaseChild = new BaseChild();
console.log(objbase);
console.log(objbaseChild);
console.log(objbase.name);
console.log(objbase.sayHello());

console.log(objbaseChild.name);
console.log(objbaseChild.sayName());
